import math


def fun(x):
    return 1/x
def fix_fun(t,a,b):#这个是给让德勒公式用的
    return fun((a+b)/2+t*(b-a)/2)

def legendre_n2(a,b):
    return (b-a)/2*(0.8888889*fix_fun(0,a,b)+0.5555556*(fix_fun(-0.7745967,a,b)+fix_fun(0.7745967,a,b)))

def legendre_n5(a,b):
    return (b-a)/2*(0.5688889*fix_fun(0,a,b)+0.4786287*(fix_fun(-0.5384693,a,b)+fix_fun(0.5384693,a,b))+0.2369269*(fix_fun(-0.9061799,a,b)+fix_fun(0.9061799,a,b)))

def legendre_n1(a,b):
    return (b-a)/2*(fix_fun(-0.5773503,a,b)+fix_fun(0.5773503,a,b))

def complex_legendre(a,b,n):
    sum=0
    h=(b-a)/n
    aa=a
    bb=a+h
    for i in range(n):
        sum+=legendre_n1(aa,bb)
        aa+=h
        bb+=h
    return sum

def trapezoid(a,b,n):
    if n==1:
        return (b-a)/2*(fun(a)+fun(b))
    else:

        h=(b-a)/n
        return trapezoid(a, b, int(n / 2))/2+(b - a)/n*sum(fun(a+h+h*2*i) for i in range(0, int(n/2)))

def simpson(a,b,n):
    return (4*trapezoid(a,b,2*n)-trapezoid(a,b,n))/3

def cotes(a,b,n):
    return (16 * simpson(a, b, 2*n) - simpson(a, b, n)) / 15

def romberg(a,b,n):
    return (64 * cotes(a, b, 2*n) - cotes(a, b, n)) / 63


(a,b)=input().strip().split(' ')
(a,b)=(float(a),float(b))

print("%.5f"%romberg(a,b,16))
print("%.5f"%legendre_n2(a,b))
print("%.5f"%legendre_n5(a,b))
print("%.5f"%complex_legendre(a,b,4))